-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Item
: remove isAction
, use onClick
to discriminate if it should render as button
#35152
Conversation
Size Change: -3.72 kB (0%) Total Size: 1.06 MB
ℹ️ View Unchanged
|
@@ -13,26 +13,47 @@ import { useItemGroupContext } from '../context'; | |||
import { useCx } from '../../utils/hooks/use-cx'; | |||
import type { ItemProps } from '../types'; | |||
|
|||
function useDeprecatedProps( { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure we need this since this component is experimental and probably only used in Gutenberg.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ItemGroup
was promoted in #33701 and released in Gutenberg 11.3, but it's always been marked as experimental and, as you said, doesn't probably any usages outside of Gutenberg. I will go ahead and remove all traces of isAction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in a148cea
(#35152)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM 👍 Thanks for making that change
Item
: mark isAction
as deprecated, use onClick
to discriminate if it should render as button
Item
: remove isAction
, use onClick
to discriminate if it should render as button
Description
This PR explores an idea that was born in #35142 (comment), where the
isAction
prop is being removed. TheItem
component would instead render as abutton
if theonClick
prop is present (while still giving priority to theas
prop in any case when specified).How has this been tested?
Types of changes
Refactor (including removal of a prop on an experimental component).
Checklist:
*.native.js
files for terms that need renaming or removal).